package com.rain.cy.framework.utils;

import org.apache.commons.lang3.StringUtils;

/**
 * @author chen_yu
 */
public class KeyUtil {


    /**
     * 构建道路的RedisKey
     *
     * @param parentCode
     * @param name
     * @return
     */
    public static String buildKey(String parentCode, String name) {
        String p = StringUtils.isEmpty(parentCode) ? "root" : parentCode;
        return p.concat("-").concat(name.toLowerCase());
    }

}
